<?php

declare(strict_types=1);
/**
 * This file is part of habo_new_media.
 *
 * @link     https://www.berlen.cn/
 * @contact  tech@berlen.cn
 * @license  http://gitlab.rehou.cn/habo/habo_new_media/-/blob/master/README.md
 */
namespace app\model\mongo;

class MongoProductAccountTypeDayStatModel extends MongoStatModel
{
    protected $connection = 'mongodb';

    protected $name = 'product_account_type_day_stat';

    protected $pk = '_id';

    protected $autoWriteTimestamp = true;

    /**
     * 汇总必需字段.
     * @return string[]
     */
    public function getNeedField(): array
    {
        return [
            'client_id',
            'product_id',
            'media_id',
            'account_type',
            'stat_date',
            'xs_id',
            'zl_id',
            'balance',
            'cost',
            'cash_cost',
            'reward_cost',
            'version',
        ];
    }

    /**
     * 汇总字段.
     * @return string[]
     */
    public function getSumField(): array
    {
        return [
            'stat_date',
            'product_id',
            'account_type',
            'media_id',
        ];
    }
}
